<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/js.vue.js"></script>
</head>
<body>
        <div id="app">
            <Com-Name></Com-Name>
        </div>
        <script>
            let app=Vue.createApp({
                data(){
                    return{
                          aa:18  
                    }
                },
                //  provide:{
                //             img:"卧龙",
                //             age:"凤雏",
                           
                //         },
                        provide(){
                             return{
                                ac:this.aa,
                                img:"卧龙",
                                age:"凤雏",
                            }
                        },
                    components:{ 
                        ComName:{
                        inject:["img","age","ac"], 
                        template:`<h1>{{img}}-{{age}}-{{ac}}</h1>
                        <h2>{{ac}}</h2>
                        `
                    }
                    }
            });
            app.mount("#app")
        </script>
</body>
</html>